]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm: replace 'gdm-password' with a constant
authorRay Strode <rstrode@redhat.com>
Tue, 6 Sep 2011 18:18:20 +0000 (14:18 -0400)
committerRay Strode <rstrode@redhat.com>
Sat, 17 Sep 2011 16:53:54 +0000 (12:53 -0400)
It's a little messy to have 'gdm-password' strung all
through the code, so this commit defines a constant up
top and uses that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=657823

js/gdm/loginDialog.js

index be7f3745c4d75c89a698e7b6401d3d2e8ebdb2c5..178551e3d7b124e0959352f76fb311f881d9ec17 100644 (file)
@@ -38,6 +38,7 @@ const Main = imports.ui.main;
 const ModalDialog = imports.ui.modalDialog;
 const Tweener = imports.ui.tweener;
 
+const _PASSWORD_SERVICE_NAME = 'gdm-password';
 const _FADE_ANIMATION_TIME = 0.16;
 const _RESIZE_ANIMATION_TIME = 0.25;
 const _SCROLL_ANIMATION_TIME = 2.0;
@@ -734,7 +735,7 @@ LoginDialog.prototype = {
 
         this._greeterClient.open_connection();
 
-        this._greeterClient.call_start_conversation('gdm-password');
+        this._greeterClient.call_start_conversation(_PASSWORD_SERVICE_NAME);
 
         this._greeterClient.connect('reset',
                                     Lang.bind(this, this._onReset));
@@ -851,7 +852,7 @@ LoginDialog.prototype = {
     },
 
     _onReset: function(client, serviceName) {
-        this._greeterClient.call_start_conversation('gdm-password');
+        this._greeterClient.call_start_conversation(_PASSWORD_SERVICE_NAME);
 
         let tasks = [this._hidePrompt,
 
@@ -1154,7 +1155,7 @@ LoginDialog.prototype = {
                                                       this._fadeOutNotListedButton]),
 
                      function() {
-                         this._greeterClient.call_begin_verification('gdm-password');
+                         this._greeterClient.call_begin_verification(_PASSWORD_SERVICE_NAME);
                      }];
 
         let batch = new Batch.ConsecutiveBatch(this, tasks);
@@ -1204,7 +1205,7 @@ LoginDialog.prototype = {
 
                      function() {
                          let userName = activatedItem.user.get_user_name();
-                         this._greeterClient.call_begin_verification_for_user('gdm-password',
+                         this._greeterClient.call_begin_verification_for_user(_PASSWORD_SERVICE_NAME,
                                                                               userName);
                      }];